<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>top</title>
    
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<meta http-equiv="content-type" content="text/html;charset=utf-8">
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
<style type="text/css">
	body {
		background: #288FFF;
		margin: 0px;
		color: #ffffff;
	}
	a {
		text-decoration:none;
		color: #ffffff;
		font-weight: 900;
		line-height:18px;
	} 
	a:hover {
		text-decoration: underline;
		color: #ffffff;
		font-weight: 900;
	}
	h1{
			font-family:STHeiTi;
	}
</style>
  </head>
  
  <body>
<h1 style="text-align: center;">网上商城</h1>
<div style="font-size: 10pt; line-height: 10px;">

<%-- 根据用户是否登录，显示不同的链接 --%>

	<c:choose>
		<c:when test="${empty sessionScope.user }">
			  <a href="/NBS/jsps/user/login.jsp" target="_parent">您好,请登录!</a> |&nbsp; 
		  	<a href="/NBS/jsps/user/regist.jsp" target="_parent">免费注册</a>
		<br/>
		</c:when>
		<c:otherwise>
			 ${user.loginname }&nbsp;<img src="/NBS/images/user_plus.png"/>  &nbsp;|&nbsp;&nbsp;
		  <a href="/NBS/jsps/cart/list.jsp" target="body">我的购物车</a>&nbsp;&nbsp;|&nbsp;&nbsp;
		  <a href="/NBS/jsps/order/list.jsp" target="body">我的订单</a>&nbsp;&nbsp;|&nbsp;&nbsp;
		  <a href="/NBS/jsps/user/pwd.jsp" target="body">修改密码</a>&nbsp;&nbsp;|&nbsp;&nbsp;
		  <a href="/jsps/user/login.jsp" target="_parent">退出</a>
		
		</c:otherwise>
	
	</c:choose>
		
		
</div>
  </body>
</html>
